package com.wqm.step.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wqm.step.pojo.Uuid;
import com.wqm.step.service.UuidService;

@Controller
public class UuidController {

	@Autowired
	private UuidService uuidService;

	/**
	 * produces : 设置浏览器端的编码
	 * 
	 * @return
	 */
	@RequestMapping(value = "saveUuid.action", produces = { "text/html;charset=UTF-8" })
	@ResponseBody
	public String saveUuid() {
		Uuid u = new Uuid();
		u.setName("这是个好名字！");
		
		uuidService.saveUuid(u);
		return "数据保存成功？ 看看吧";
	}
}
